/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class CeilingFanLamp {
    static categoryCode = '010010011';

    static categoryName = '吊扇灯';

    device = {};

    opts = {};

    _to = undefined;

    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device;
        this.opts = opts;
        this._to = to;
    }

    get categoryCode() {
        return CeilingFanLamp.categoryCode;
    }

    get categoryName() {
        return CeilingFanLamp.categoryName;
    }

    getBrightness(params) {
        return command({
            method: 'getBrightness',
            methodId: 'p1vFkq6x',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getFanSpeed(params) {
        return command({
            method: 'getFanSpeed',
            methodId: 'pghzV1Gq',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getFanSwitch(params) {
        return command({
            method: 'getFanSwitch',
            methodId: 'pDrhxksb',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getLightMode(params) {
        return command({
            method: 'getLightMode',
            methodId: 'phEqZodk',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getLightSwitch(params) {
        return command({
            method: 'getLightSwitch',
            methodId: 'ptRSARP1',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setBrightness(params) {
        return command({
            method: 'setBrightness',
            methodId: 'peHyXjlL',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setFanSpeed(params) {
        return command({
            method: 'setFanSpeed',
            methodId: 'pUPQQiTV',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setFanSwitch(params) {
        return command({
            method: 'setFanSwitch',
            methodId: 'ppAXpyIS',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setLightMode(params) {
        return command({
            method: 'setLightMode',
            methodId: 'pZgRgHj3',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setLightSwitch(params) {
        return command({
            method: 'setLightSwitch',
            methodId: 'pGoxubaG',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default CeilingFanLamp;
